package com.mmp.main.servlet.report;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.mmp.common.servlet.BasicServlet;
import com.mmp.main.entity.HospitalDevice;
import com.mmp.main.util.Default;
import com.mmp.main.util.Enums;
import com.mmp.main.util.WebUtil;

public class ViewDeviceDetails extends BasicServlet {

	public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		HospitalDevice device = (HospitalDevice) request.getAttribute(Default.DEVICE_INFO_ATTR_NAME);
		request.setAttribute("deviceStatus", WebUtil.getDeviceStatusName(device));
		viewHTMLReport(request, response, "report/ViewDeviceDetails.jsp",
				Enums.REPORT_TITLE.DEVICE_DETAILS.getReportTitle());
	}

}
